import {
  createRouter,
  createWebHistory,
  createWebHashHistory,
} from 'vue-router';
import Layout from '@/components/layout/index.vue';
const routes = [
  {
    path: '/',
    redirect: '/login',
  },
  {
    path: '/login',
    component: () => import('@/pages/login/login.vue'),
  },
   {
    path: '/demo',
    component: () => import('@/pages/demo/demo.vue'),
  },
  {
    path: '/redirect',
    component: Layout,
    hidden: true,
    children: [
      {
        path: '/redirect/:path(.*)',
        component: () => import('@/pages/redirect/index.vue'),
      },
    ],
  },
  {
    path: '/layout',
    component: Layout,
    children: [
      {
        path: '/zhzfgzt',
        component: () => import('@/pages/zhzf/gzt/gzt.vue'),
        name: '工作台',
        icon: '',
        meta: {
          title: '综合执法工作台(队长/队员)',
          icon: 'dashboard',
        },
      },
      {
        path: '/zhzfgzt',
        component: () => import('@/pages/zhzf/gzt/gzt.vue'),
        name: '社区工作台老',
        icon: '',
        meta: {
          title: '社区工作台',
          icon: 'dashboard',
        },
      },
      {
        path: '/zhzfgzt',
        component: () => import('@/pages/zhzf/gzt/gzt.vue'),
        name: '物业工作台',
        icon: '',
        meta: {
          title: '物业工作台',
          icon: 'dashboard',
        },
      },
      {
        path: '/sqgzt',
        component: () => import('@/pages/firstpage/sqgzt.vue'),
        name: '社区工作台新',
        icon: '',
        meta: {
          title: '社区工作台新',
          icon: 'dashboard',
        },
      },
      {
        path: '/jdldgzt',
        component: () => import('@/pages/firstpage/jdldgzt.vue'),
        name: '街道领导工作台',
        icon: '',
        meta: {
          title: '街道领导工作台',
          icon: 'dashboard',
        },
      },
      {
        path: '/zhzxgzt',
        component: () => import('@/pages/firstpage/zhzxgzt.vue'),
        name: '指挥中心',
        icon: '',
        meta: {
          title: '指挥中心',
          icon: 'dashboard',
        },
      },
      {
        path: '/ggglgzt',
        component: () => import('@/pages/firstpage/ggglgzt.vue'),
        name: '公共管理',
        icon: '',
        meta: {
          title: '公共管理',
          icon: 'dashboard',
        },
      },
      {
        path: '/zhzfgzt',
        component: () => import('@/pages/zhzf/gzt/gzt.vue'),
        name: '公共管理（科长/科员）',
        icon: '',
        meta: {
          title: '公共管理（科长/科员）',
          icon: 'dashboard',
        },
      },
      {
        path: '/ggaqgzt',
        component: () => import('@/pages/firstpage/ggaqgzt.vue'),
        name: '公共安全工作台',
        icon: '',
        meta: {
          title: '公共安全工作台（科长/科员）',
          icon: 'dashboard',
        },
      },
      {
        path: '/videoplayloop',
        component: () => import('@/pages/videoPlay/videoplay.vue'),
        name: '',
        icon: '',
        meta: {
          title: '场景视频轮询',
          icon: 'dashboard',
        },
      },
      {
        path: '/zlcj/:id',
        component: () => import('@/pages/zlcj/index.vue'),
        name: '',
        icon: '',
        meta: {
          title: '治理场景',
          icon: 'dashboard',
        },
      },
      {
        path: '/yplb',
        component: () => import('@/pages/event/yplb.vue'),
        name: '研判列表',
        icon: '',
        meta: {
          title: '研判列表',
          icon: 'dashboard',
        },
      },
      {
        path: '/fplist',
        component: () => import('@/pages/event/fplist.vue'),
        name: '分配列表',
        icon: '',
        meta: {
          title: '分配列表',
          icon: 'dashboard',
        },
      },

      {
        path: '/ypdetail',
        component: () => import('@/pages/eventdetail/ypdetail.vue'),
        name: '研判列表详情',
        icon: '',
        meta: {
          title: '研判列表详情',
          icon: 'dashboard',
        },
      },
      {
        path: '/eventlist',
        component: () => import('@/pages/event/event.vue'),
        name: '事件列表',
        icon: '',
        meta: {
          title: '事件列表',
          icon: 'dashboard',
        },
      },
      {
        path: '/eventhandling',
        component: () => import('@/pages/eventhandling/eventhandling.vue'),
        name: '事件处置',
        icon: '',
        meta: {
          title: '事件处置',
          icon: 'dashboard',
        },
      },
      {
        path: '/eventdetail',
        component: () => import('@/pages/eventdetail/eventdetail.vue'),
        name: '事件详情',
        icon: '',
        meta: {
          title: '事件详情',
          icon: 'dashboard',
        },
      },
      {
        path: '/fpdetail',
        component: () => import('@/pages/eventdetail/fpdetail.vue'),
        name: '指派详情',
        icon: '',
        meta: {
          title: '指派详情',
          icon: 'dashboard',
        },
      },
      {
        path: '/czdetail',
        component: () => import('@/pages/eventdetail/czdetail.vue'),
        name: '处置详情',
        icon: '',
        meta: {
          title: '处置详情',
          icon: 'dashboard',
        },
      },
      {
        path: '/sjmlgl',
        component: () => import('@/pages/sjwhzx/sjml/sjml.vue'),
        name: '数据目录',
        icon: '',
        meta: {
          title: '数据目录',
          icon: 'dashboard',
        },
      },
      {
        path: '/sjmlxq',
        component: () => import('@/pages/sjwhzx/sjml/sjmlxq.vue'),
        name: 'sjmlxq',
        icon: '',
        meta: {
          title: '数据目录详情',
          icon: 'dashboard',
        },
      },
      {
        path: '/sjfxzx',
        component: () => import('@/pages/sjfxzx/sjfxzx/sjfxzx.vue'),
        name: '数据分析中心',
        icon: '',
        meta: {
          title: '数据分析中心',
          icon: 'dashboard',
        },
      },
      {
        path: '/sjcxzx',
        component: () => import('@/pages/sjcxzx/sjcxzx.vue'),
        name: '数据查询中心',
        icon: '',
        meta: {
          title: '数据查询中心',
          icon: 'dashboard',
        },
      },
      {
        path: '/enterprise',
        component: () => import('@/pages/files/enterprise/enterprise.vue'),
        name: '企业档案',
        icon: '',
        meta: {
          title: '企业档案',
          icon: 'dashboard',
        },
      },
      {
        path: '/merchant',
        component: () => import('@/pages/files/merchant/merchant.vue'),
        name: '商户档案',
        icon: '',
        meta: {
          title: '商户档案',
          icon: 'dashboard',
        },
      },
      {
        path: '/securitycheck',
        component: () =>
          import('@/pages/files/securityCheck/securityCheck.vue'),
        name: '安全检查',
        icon: '',
        meta: {
          title: '安全检查',
          icon: 'dashboard',
        },
      },
      {
        path: '/reportform',
        component: () => import('@/pages/files/reportform/reportform.vue'),
        name: '安全生产报表',
        icon: '',
        meta: {
          title: '安全生产报表',
          icon: 'dashboard',
        },
      },
      {
        path: '/potentialSafe',
        component: () =>
          import('@/pages/files/potentialSafe/potentialSafe.vue'),
        name: '安全生产隐患记录',
        icon: '',
        meta: {
          title: '安全生产隐患记录',
          icon: 'dashboard',
        },
      },
      {
        path: '/realvideo/:type',
        component: () => import('@/pages/video/index.vue'),
        name: '视频中心',
        icon: '',
        meta: {
          title: '视频中心',
          icon: 'dashboard',
        },
      },
      {
        path: '/video/:type',
        component: () => import('@/pages/video/index.vue'),
        name: '视频中心新',
        icon: '',
        meta: {
          title: '视频中心新',
          icon: 'dashboard',
        },
      },
      {

        path: '/chatvideo',
        component: () => import('@/pages/dmxvideo/index.vue'),
        name: 'AI模型',
        icon: '',
        meta: {
          title: 'AI模型',
          icon: 'dashboard',
        },
      },
      {
        path: '/DownloadCenter',
        component: () => import('@/pages/workbench/index.vue'),
        name: '下载中心',
        icon: '',
        meta: {
          title: '下载中心',
          icon: 'dashboard',
        },
      },
      {
        path: '/patrolTaskManage',
        component: () =>
          import('@/pages/videoplan/playConfig/patrolTaskManage.vue'),
        name: '视频巡查任务管理',
        icon: '',
        meta: {
          title: '视频巡查任务管理',
          icon: 'dashboard',
        },
      },
      {
        path: '/WorkPatrol',
        component: () => import('@/pages/videoplan/workPatrol/index.vue'),
        name: '视频巡查',
        icon: '',
        meta: {
          title: '视频巡查',
          icon: 'dashboard',
        },
      },
      {
        path: '/videoMeet',
        component: () => import('@/pages/videoMeet/index.vue'),
        name: '视频会议',
        icon: '',
        meta: {
          title: '视频会议',
          icon: 'dashboard',
        },
      },
      {
        path: '/workPatrol/goPatrol',
        component: () =>
          import('@/pages/videoplan/workPatrol/goPatrol/index.vue'),
        name: '开始巡查',
        icon: '',
        meta: {
          title: '开始巡查',
          icon: 'dashboard',
        },
      },
      {
        path: '/videoMeet/meet',
        component: () => import('@/pages/videoMeet/meet.vue'),
        name: '开始会议',
        icon: '',
        meta: {
          title: '开始会议',
          icon: 'dashboard',
        },
      },
      {
        path: '/mapvue',
        component: () => import('@/pages/map/index.vue'),
        name: '电子地图',
        icon: '',
        meta: {
          title: '电子地图',
          icon: 'dashboard',
        },
      },
      {
        path: '/attendance',
        component: () => import('@/pages/attendance/index.vue'),
        name: '考勤统计表',
        icon: '',
        meta: {
          title: '考勤统计表',
          icon: 'dashboard',
        },
      },
      {
        path: '/attendance/detail',
        component: () => import('@/pages/attendance/detail.vue'),
        name: '考勤明细表',
        icon: '',
        meta: {
          title: '考勤明细表',
          icon: 'dashboard',
        },
      },
      {
        path: '/attendance/settings',
        component: () => import('@/pages/attendance/setAttendance.vue'),
        name: '考勤设置',
        icon: '',
        meta: {
          title: '考勤设置',
          icon: 'dashboard',
        },
      },

      // securityCheck
    ],
  },
];

// 3. 创建路由实例并传递 `routes` 配置
// 你可以在这里输入更多的配置，但我们在这里
// 暂时保持简单
const router = createRouter({
  // 4. 内部提供了 history 模式的实现。为了简单起见，我们在这里使用 hash 模式。
  history: createWebHashHistory('/enforcement/'),
  // base: '/enforcement/',
  routes, // `routes: routes` 的缩写
});

export default router;
